using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace PlatformShoot
{
    public class CameraCtrl : MonoBehaviour
    {
        private Transform mTarget;

        private void Start()
        {
            mTarget = GameObject.FindGameObjectWithTag("Player").transform;
        }

        private void LateUpdate()
        {
            //跟随主角移动镜头，需要注意z轴如果添加-10 可能会在镜头内不存在
            transform.localPosition = new Vector3(mTarget.position.x,mTarget.position.y,-10);
        }
    }
}